package main

import "fmt"

func main(){
	fmt.Println(bubbleSort([]int{2,5,4,1,56,546}))
}

func bubbleSort(data []int)(result []int){
	length := len(data)
	if length < 1{
		return
	}
	for i:=0; i < length; i++{
		for j:=i+1; j < length; j++{
			if data[i] > data[j]{
				temp := data[j]
				data[j] = data[i]
				data[i] = temp
			}
		}
	}
	return data
}